import React, { Component } from 'react'
import Layout from './pages/Layout'
import HomeCity from './pages/Hotcity/HomeCity'
import Detail from './pages/detail/Detail.jsx'
import Commont from './pages/commont/Commont.jsx'
import Search from './pages/search/Search.jsx'
import Map from './pages/Map/Map.jsx'
import 'assets/styles/reset.css'
import { BrowserRouter as Router, Switch, Route, Redirect } from "react-router-dom"
export default class App extends Component {
  render() {
    return (
      <Router>
      <Switch> 
        <Route path="/home" component={Layout}></Route>
        <Route path="/hotcity/:name/:id/:flag" component={HomeCity}></Route>
        <Route path="/detail" component={Detail}></Route>
        <Route path="/commont" component={Commont}></Route>
        <Route path="/search" component={Search}></Route>
        <Route path="/map" component={Map}></Route>
        <Redirect
               from="/"
              to="/home"
                ></Redirect>
     </Switch> 
     </Router>
    )
  }
}

